package site.wanjiahao.handler.client;

import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import site.wanjiahao.message.response.ListGroupsResponseMessage;

import java.util.Set;

@ChannelHandler.Sharable
public class ListGroupsResponseMessageHandler extends SimpleChannelInboundHandler<ListGroupsResponseMessage> {

    @Override
    protected void channelRead0(ChannelHandlerContext ctx, ListGroupsResponseMessage msg) throws Exception {
        Set<String> groups = msg.getGroups();
        System.out.println("当前存在的组为：" + groups);
    }
}
